/**
 * 
 * @param {string} key 键
 * @returns key对应的值
 */

function getParams(key) {
    //location.search的值就是 "?参数名=值&...&参数名=值"
    let qs = window.location.search.substring(1)
    qs = decodeURI(qs)
    let arr = qs.split('&')
    for (let i = 0; i < arr.length; i++) {
        let tempArr = arr[i].split('=')
        if (tempArr[0] === key) {
            return tempArr[1]
        }
    }
    return false
}